const bcrypt = require('bcrypt');

const encrypt = async (password, saltTimes) => {
    return bcrypt.hash(password, saltTimes)
}

const valitate = async (password, hash) => {
    return await bcrypt.compare(password, hash)
}

module.exports = {
    encrypt,
    valitate
}